<template>
    <div>
        <el-button @click="editHandle" size="mini" plain icon="el-icon-edit">编辑</el-button>
        <el-popconfirm style="margin-left: 10px;" title="是否确认删除？" confirmButtonText="确认" cancelButtonText="取消"
            confirmButtonType="danger" cancelButtonType="text" @confirm="deleteHandle">
            <el-button slot="reference" size="mini" type="danger" plain icon="el-icon-delete">删除</el-button>
        </el-popconfirm>
    </div>
</template>

<script>

// 表格操作栏的删除和编辑
// todo 权限处理 传进来用v-if控制显示
export default{
    props:{
        scope:Object
    },
    methods:{
        editHandle(){
            this.$emit("editHandle",this.scope.row)
        },
        deleteHandle(){
            this.$emit("deleteHandle",this.scope.row)
        }
    }
}
</script>
